SET autocommit=1;
SELECT @@session.session_track_system_variables INTO @old_track_list;
SET @track_list= CONCAT(@old_track_list, ",transaction_isolation,                                            transaction_read_only");
SET SESSION session_track_system_variables=@track_list;
SELECT @@session.session_track_state_change INTO @old_track_enable;
SET SESSION session_track_state_change=TRUE;
SELECT @@session.session_track_transaction_info INTO @old_track_tx;
FLUSH STATUS;
CREATE TABLE t1 (f1 INT) ENGINE="InnoDB";
CREATE TABLE t2 (f1 INT) ENGINE="MyISAM";
INSERT INTO t1 VALUES(1);
SELECT 1 FROM DUAL;
DELETE FROM t1;
START TRANSACTION;
SET @x=UUID();
SET @x=1;
COMMIT AND CHAIN;
SELECT 1 FROM DUAL;
COMMIT AND CHAIN;
SELECT 1 FROM DUAL INTO OUTFILE '/data/yu/Squirrel_DBMS_Fuzzing/MySQL_source/mysql-server-inst/bld/mysql-test/var/tmp/wl6631.csv';
COMMIT AND CHAIN;
SELECT f1 FROM t1 INTO OUTFILE '/data/yu/Squirrel_DBMS_Fuzzing/MySQL_source/mysql-server-inst/bld/mysql-test/var/tmp/wl6631.csv';;
COMMIT AND CHAIN;
SELECT f1 FROM t2 INTO OUTFILE '/data/yu/Squirrel_DBMS_Fuzzing/MySQL_source/mysql-server-inst/bld/mysql-test/var/tmp/wl6631.csv';;
SELECT 1 FROM DUAL INTO @x;
COMMIT;
DROP TABLE t1;
DROP TABLE t2;
CREATE TABLE t1 (f1 INT) ENGINE="InnoDB";
CREATE TABLE t2 (f1 INT) ENGINE="MyISAM";
START TRANSACTION;
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
INSERT INTO t1 VALUES (1);
ROLLBACK;
START TRANSACTION;
INSERT INTO t2 VALUES (1);
INSERT INTO t1 VALUES (1);
SELECT f1 FROM t1;
SELECT f1 FROM t2;
ROLLBACK;
DROP TABLE t1, t2;
CREATE TABLE t1 (f1 INT) ENGINE="InnoDB";
SET autocommit=0;
SET @x=UUID();
SET @x=1;
SET @x=UUID();
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
INSERT INTO t1 VALUES(1);
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
BEGIN;
INSERT INTO t1 VALUES(3);
DROP TABLE t1;
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
BEGIN;
SELECT 1 FROM DUAL;
SELECT 1 FROM DUAL INTO @dummy;
COMMIT;
CREATE TABLE t2 (f1 INT) ENGINE="MyISAM";
SELECT f1 FROM t2;
DROP TABLE t2;
SET autocommit=1;
CREATE TABLE t2 (f1 INT) ENGINE="MyISAM";
BEGIN;
COMMIT; INSERT INTO t2 VALUES (1); BEGIN; ;
COMMIT;
DROP TABLE t2;
CREATE TABLE t1 (f1 INT) ENGINE="InnoDB";
CREATE TABLE t2 (f1 INT) ENGINE="MyISAM";
BEGIN;
COMMIT; INSERT INTO t2 VALUES (1); BEGIN; INSERT INTO t1 VALUES (99); ;
COMMIT;
DROP TABLE t1;
DROP TABLE t2;
CREATE TABLE t1 (f1 INT) ENGINE="InnoDB";
CREATE TABLE t2 (f1 INT) ENGINE="MyISAM";
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (2);
CREATE PROCEDURE proc2() BEGIN CALL proc1(); UPDATE t1 SET f1=4; END;
CREATE PROCEDURE proc3() BEGIN DECLARE x CHAR(36); SET x=UUID(); END;
CREATE PROCEDURE proc4(x CHAR(36)) BEGIN END;
CREATE PROCEDURE proc5() BEGIN SELECT f1 FROM t1; SELECT f1 FROM t2; END;
CREATE PROCEDURE proc6a() BEGIN IF (SELECT f1 FROM t1) THEN SET @dummy = 1; END IF; ALTER TABLE t1 ADD COLUMN f2 INT; IF (SELECT f1 FROM t2) THEN SET @dummy = 1; END IF; END;
CREATE PROCEDURE proc6b() BEGIN SELECT f1 FROM t1; ALTER TABLE t1 ADD COLUMN f3 INT; SELECT f1 FROM t2; END;
CREATE PROCEDURE proc7(x INT) BEGIN SELECT f1   FROM t1; SELECT f1*2 FROM t1; END;
BEGIN;
CALL proc3();
CALL proc1();
CALL proc2();
COMMIT;
BEGIN;
CALL proc4(UUID());
COMMIT;
CALL proc5();
BEGIN;
CALL proc5();
COMMIT;
SET autocommit=0;
CALL proc5();
COMMIT;
BEGIN;
CALL proc5();
COMMIT;
BEGIN;
CALL proc6b();
COMMIT;
BEGIN;
CALL proc6a();
COMMIT;
BEGIN;
SELECT 1 FROM DUAL;
CALL proc7((SELECT f1 FROM t2));
COMMIT;
SET autocommit=1;
BEGIN;
SELECT 1 FROM DUAL;
CALL proc7((SELECT f1 FROM t2));
COMMIT;
